package com.imooc.exception;

import com.imooc.result.ResponseStatusEnum;

/**
 * @author liansen
 * @create 12-23-14:53
 */
public class MyException extends RuntimeException{

    private ResponseStatusEnum responseStatusEnum;

    public MyException(ResponseStatusEnum responseStatusEnum) {
        super("异常状态码为: " + responseStatusEnum.status() + ";" + "异常信息为: " + responseStatusEnum.msg());
        this.responseStatusEnum = responseStatusEnum;
    }

    public ResponseStatusEnum getResponseStatusEnum() {
        return responseStatusEnum;
    }

    public void setResponseStatusEnum(ResponseStatusEnum responseStatusEnum) {
        this.responseStatusEnum = responseStatusEnum;
    }
}
